package lt.hsu.thr;

import lombok.Getter;
import lt.hsu.web.ErrorCode;

@Getter
public class LtException extends RuntimeException{

    private final long code;

    public LtException(long code,String message){
        super(message);
        this.code = code;
    }

    public LtException(ErrorCode code){
        this(code.getCode(),code.getMessage());
    }

    @Override
    public synchronized Throwable fillInStackTrace() {
        return this;
    }
}
